-
Notifications
You must be signed in to change notification settings - Fork 4
fix: switch to @stylistic/exp-list-style to resolve array edge-cases
#1203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
susnux
commented
Nov 6, 2025
- closes [wip] fix(codestyle/array): handle edge case with multi line array #1166
The old value was not multi line (considered by the fixer) because brackets and first / last item are on the same line. |
|
This? https://eslint.style/rules/list-style#maxitems Looks nice, I'd consider great if limited to 3 items, maybe? |
Pushed a commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe exclude functions |
I'm voting for the previous behavior. If a developer makes it multiline — keep multiline. If single-line - keep single line. The decision here doesn't depend on the number of items but on the nature of the array. |
|
In the referenced PR the tests were adjusted to be more real life like, with som explanations |
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
|
@ShGKme I added the tests you created to this PR see the two commits to see how it is changed |
| const LATIN_VOWELS = [ | ||
| 'a', | ||
| 'e', | ||
| 'i', | ||
| 'o', | ||
| 'u', | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need diff-safe here? I don't think new vowels are expected to be added 👀

